package com.youxin.busfoundation.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;


@Configuration
@PropertySource("classpath:${spring.profiles.active}/wxinfo.properties")
@ConfigurationProperties(prefix="wx")
public class WxBeanConfig{
	private String appId,appCecret,token,mchId,apiKey,signType,certPath,unifiedOrderUrl,orderQueryUrl,shortUrl,notifyUrl;
	
	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getAppCecret() {
		return appCecret;
	}

	public void setAppCecret(String appCecret) {
		this.appCecret = appCecret;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getMchId() {
		return mchId;
	}

	public void setMchId(String mchId) {
		this.mchId = mchId;
	}

	public String getApiKey() {
		return apiKey;
	}

	public void setApiKey(String apiKey) {
		this.apiKey = apiKey;
	}

	public String getSignType() {
		return signType;
	}

	public void setSignType(String signType) {
		this.signType = signType;
	}

	public String getCertPath() {
		return certPath;
	}

	public void setCertPath(String certPath) {
		this.certPath = certPath;
	}

	public String getUnifiedOrderUrl() {
		return unifiedOrderUrl;
	}

	public void setUnifiedOrderUrl(String unifiedOrderUrl) {
		this.unifiedOrderUrl = unifiedOrderUrl;
	}

	public String getOrderQueryUrl() {
		return orderQueryUrl;
	}

	public void setOrderQueryUrl(String orderQueryUrl) {
		this.orderQueryUrl = orderQueryUrl;
	}

	public String getShortUrl() {
		return shortUrl;
	}

	public void setShortUrl(String shortUrl) {
		this.shortUrl = shortUrl;
	}

	public String getNotifyUrl() {
		return notifyUrl;
	}

	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}

	private static WxBeanConfig config=null;	
	public static void initWithConfig(WxBeanConfig wxConfig)
	{
		config=wxConfig;
	}
	
	public static WxBeanConfig getConfig()
	{
		return config;
	}
}
